package com.ww.scm.entity.pub;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonAutoDetect;
import org.codehaus.jackson.annotate.JsonMethod;
import org.codehaus.jackson.annotate.JsonProperty;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.ww.scm.entity.AbstractEntity;
import com.ww.scm.valueObject.dic.DictionaryVo;

@Entity
@Table(name = "T_PUB_DIC")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
// 基础数据

@JsonAutoDetect(JsonMethod.NONE)
public class Dictionary extends AbstractEntity {

	//类型
	private String type;
	//编号
	@JsonProperty
	private String code;
	//名称
	@JsonProperty
	private String name;
	
	@JsonProperty
	private String parent;
	
	private String other1;
	
	private String other2;
	
	private String other3;
	
	private String other4;
	
	private String other5;
	
	private String other6;
	
	private String other7;
	
	private String other8;
	
	private String other9;
	
	private String other10;
	public Dictionary() {
	}
	
	@Column(name = "F_TYPE_ID", nullable = false,  length = 32)
	public String getType() {
		return type;
	}
	
	@Column(name = "F_CODE", nullable = false,  length = 128)
	public String getCode() {
		return code;
	}
	
	@Column(name = "F_NAME", nullable = false, length = 128)
	public String getName() {
		return name;
	}

	@Column(name = "F_PARENT_ID", nullable = true, length = 32)
	public String getParent() {
		return parent;
	}
	 
 
	@Column(name = "F_OTHER_ID1", nullable = true, length = 32)
	public String getOther1() {
		return other1;
	}
	
	@Column(name = "F_OTHER_ID2", nullable = true, length = 32)
	public String getOther2() {
		return other2;
	}
	
	@Column(name = "F_OTHER_ID3", nullable = true, length = 32)
	public String getOther3() {
		return other3;
	}
	
	@Column(name = "F_OTHER_ID4", nullable = true, length = 32)
	public String getOther4() {
		return other4;
	}
	
	@Column(name = "F_OTHER_ID5", nullable = true, length = 32)
	public String getOther5() {
		return other5;
	}
	
	@Column(name = "F_OTHER_ID6", nullable = true, length = 32)
	public String getOther6() {
		return other6;
	}
	
	@Column(name = "F_OTHER_ID7", nullable = true, length = 32)
	public String getOther7() {
		return other7;
	}
	
	@Column(name = "F_OTHER_ID8", nullable = true, length = 32)
	public String getOther8() {
		return other8;
	}
	
	@Column(name = "F_OTHER_ID9", nullable = true, length = 32)
	public String getOther9() {
		return other9;
	}
	
	@Column(name = "F_OTHER_ID10", nullable = true, length = 32)
	public String getOther10() {
		return other10;
	}
	
	
	public void setType(String type) {
		this.type = type;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public void setParent(String parent) {
		this.parent = parent;
	}
	
	public void setOther1(String other1) {
		this.other1 = other1;
	}
	
	public void setOther2(String other2) {
		this.other2 = other2;
	}
	public void setOther3(String other3) {
		this.other3 = other3;
	}
	
	public void setOther4(String other4) {
		this.other4 = other4;
	}
	
	public void setOther5(String other5) {
		this.other5 = other5;
	}
	
	public void setOther6(String other6) {
		this.other6 = other6;
	}
	
	public void setOther7(String other7) {
		this.other7 = other7;
	}
	
	public void setOther8(String other8) {
		this.other8 = other8;
	}
	
	public void setOther9(String other9) {
		this.other9 = other9;
	}
	
	public void setOther10(String other10) {
		this.other10 = other10;
	}
	
	public void copyOf(DictionaryVo dictionaryVo){
		this.name=dictionaryVo.getName();
		this.code=dictionaryVo.getCode();
		this.type=dictionaryVo.getTypeId();
		this.parent=dictionaryVo.getParentId();
		this.other1=dictionaryVo.getOther1Id();
		this.other2=dictionaryVo.getOther2Id();
		this.other3=dictionaryVo.getOther3Id();
		this.other4=dictionaryVo.getOther4Id();				
		this.other5=dictionaryVo.getOther5Id();
		this.other6=dictionaryVo.getOther6Id();
		this.other7=dictionaryVo.getOther7Id();
		this.other8=dictionaryVo.getOther8Id();
		this.other9=dictionaryVo.getOther9Id();
		this.sysFlag=dictionaryVo.getSysFlag();
		this.creator=dictionaryVo.getCreator();
		this.createTime=dictionaryVo.getCreateTime();
		this.lastModifier=dictionaryVo.getLastModifier();
		this.lastModifiedTime=dictionaryVo.getLastModifiedTime();
				
	}
}
